import { createRouter, createWebHistory } from 'vue-router'
import Main from '../views/main/main.vue'
import Login from "../views/login/login.vue"
const routes = [
  { path:"/",
    name:"index",
   component:Login,
   meta:{
     token:false
   }
  },
  {
    path: '/main',
    name: 'main',
    component: Main,
    meta:{
      token:true
    },
     children:[{
      path:'yq',
      component:()=>import('../views/table/tableYq.vue')
    },
    {
      path:'home',
      component:()=>import('../views/table/tableHome.vue')
    },
    {
      path:'new',
      component:()=>import('../views/table/tableNew.vue')
    },
    {
      path:'weather',
      component:()=>import('../views/table/tableWeather.vue')
    },
    {
      path:'game',
      component:()=>import('../views/table/tableGame.vue')
    },
    
  ]
  
  },
 
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
